<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/resource/img/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style media="print">
        @page {
            size: auto;
            margin: 0mm;
        }
    </style>
    <script src="/common.js"></script>
    <script type="text/javascript" src="/plugin/canvas/html2canvas.min.js"></script>
    <script type="text/javascript" src="/plugin/canvas/canvas2image.js"></script>
    <title>打印申请资料</title>
</head>
<body>
<c:forEach items="${hzConfFiles}" var="hzConfFile">
    <div class="print-page" style="page-break-after:always">
        <div class="print-header">
            <div class="print-logo">
                <img src="/platform/resource/img/logo.png" />
            </div>
        </div>
        <h2>
            <span>${hzClaim.categoryName} 申领资料</span>
            <span>档案编号：${hzClaim.claimno}</span>
            <span>${hzConfFile.name}</span>
        </h2>

        <c:forEach items="${hzConfFile.hzClaimProveFiles}" var="hzClaimProveFile">
            <div class="print-content" style="padding-top: 50px;">
                <div class="print-insurance">
                    <img src="${hzClaimProveFile.fileurl}" style="width: 95%;"/>
                </div>
            </div>
        </c:forEach>
    </div>
</c:forEach>

<script type="text/javascript">

    function remove_ie_header_and_footer() {
        var hkey_root, hkey_path, hkey_key;
        hkey_path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
        try {
            var RegWsh = new ActiveXObject("WScript.Shell");
            RegWsh.RegWrite(hkey_path + "header", "");
            RegWsh.RegWrite(hkey_path + "footer", "");
        } catch (e) { }
    }

    $(function () {
        try {
            if (!!window.ActiveXObject || "ActiveXObject" in window) {
                remove_ie_header_and_footer();
            }
        } catch (e) {

        }
        window.print();
        setTimeout(function () {
            layer.alert("资料打印完成", { closeBtn: false, title: "打印确认" }, function () {
                window.location.href = "/hzclaim/hzClaimFront/unitClaimDetails?id=${hzClaim.id}";
            });
        },1000);

    });

</script>
</body>
</html>
